﻿@model DevWeb.Biztalk.DeploymentSettings.WebUI.Models.DefaultSettingValueModel

@{
    ViewBag.Title = "CreateOrEdit";
}

<h2>CreateOrEdit</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>DefaultSettingValueModel</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.ParameterName)
        </div>
        <div class="editor-field">
            @Html.DisplayTextFor(model => model.ParameterName)
         
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.DefaultValue)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DefaultValue)
         
        </div>
        <div>Environment Values:</div>
            @if (Model != null)
            {
                foreach (var item in Model.ParameterValues)
                {
                    //Html.RenderPartial("_ParameterValue", item);
                    @Html.Label(item.Environment + " Value:");
                    @Html.TextBox(item.Environment,item.Value,new {  id = item.Environment });
                                                             
                }
            }
        
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
